﻿

using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace Fozzy.Gedcom
{
    /// <summary>
    /// Converts a GEDCOM file to an XML file.
    /// </summary>
    public class Reader                                                         : XFile
    {
        #region Declarations
        #endregion

        #region Structure
        #endregion

        #region Properties
        #endregion

        #region Constructeur

            public Reader(string fullname)                                       : base(fullname)
            {}

        #endregion

            /// Import data from the temp XML file to the people collection.
            protected override void Prepare()
            {
                base.Prepare()                                                  ;
                Convert()                                                       ;
                Combine()                                                       ;
                //Publish()                                                       ;
            }

            //private void Publish()
            //{
            //    Fozzy.Being.Static.Map = new Fozzy.Being.Map(Document);
            //}


            /// <summary>
            /// GEDCOM lines have a max length of 255 characters, this goes through
            /// the XML files and combines all of the split lines which makes the
            /// XML file easier to process.
            /// </summary>
            private void Combine()
            {
                new Continueds(this)                                            ;
                Document.Combine()                                              ;
            }

    }
}
